
var table;
$(function(){
	
	$(window.parent.document).find(".right").removeClass("rightbackground");
	
	/*layui.use('form', function(){
	       form = layui.form; 
		   form.render();
    }); */
	
	var userid=$("#hiduserid").val();
	
	if(userid==1473){
		GetStatisDataAdmin();
		InitChatsAdmin();
		InitChatsDyAdmin();
		InitChatsXlAdmin();
		InitChatsYmcqqkAdmin();
	}else{
		GetStatisData();
		InitChats();
		InitChatsDy();
		InitChatsXl();
		InitChatsYmcqqk();
		table=InitTableByBt();
	}
	
	
})

function GetStatisData(){
	$.ajax({
		type:"GET",
		url:"getstatisdata",
		//data:{vtdpid:vtdpid},
		beforeSend:function(XHR){
			
		},
		success:function(data){
			//alert(data);
			data=eval('('+data+')');
			if(data.result>0){
				if(data.items){
					if(data.items.ageMap){
						var ageobject=data.items.ageMap[0];
						var agedata=[];
						agedata.push(ageobject.count30);
						agedata.push(ageobject.count35);
						agedata.push(ageobject.count40);
						agedata.push(ageobject.count45);
						agedata.push(ageobject.count50);
						agedata.push(ageobject.count55);
						agedata.push(ageobject.count60);
						InitChats(agedata);
					}
					
					
					if(data.items.dyMap){
						var dyobject=data.items.dyMap[0];
						var dydata=[];
						dydata.push(dyobject.count30);
						dydata.push(dyobject.count35);
						dydata.push(dyobject.count40);
						dydata.push(dyobject.count45);
						dydata.push(dyobject.count50);
						dydata.push(dyobject.count55);
						dydata.push(dyobject.count60);
						InitChatsDy(dydata);
					}
					
					if(data.items.xlMap){
						var xlobject=data.items.xlMap[0];
						var xldata=[];
						xldata.push(xlobject.czxl);
						xldata.push(xlobject.gzxl);
						xldata.push(xlobject.zzxl);
						xldata.push(xlobject.zgxl);
						xldata.push(xlobject.dzxl);
						xldata.push(xlobject.bkxl);
						xldata.push(xlobject.ssxl);
						xldata.push(xlobject.bsxl);
						InitChatsXl(xldata);
					}
					
					if(data.items.ymkqjzMap){
						
						var ymobject=data.items.ymkqjzMap[0];
						var ymdata=[];
						if(ymobject==null){
							ymdata=[0,0,0,0,0,0,0,0,0]
						}
						else{
							ymdata.push(ymobject.xjts);
							ymdata.push(ymobject.tqjts);
							ymdata.push(ymobject.hjts);
							ymdata.push(ymobject.syjts);
							ymdata.push(ymobject.sangjts);
							ymdata.push(ymobject.gsts);
							ymdata.push(ymobject.bjts);
							ymdata.push(ymobject.sjts);
							ymdata.push(ymobject.qtts);
						}
						
						
						
						InitChatsYmcqqk(ymdata);
					}
					
				}
				
			}
			else{
				
			}
		},
		complete:function(XHR){
			
		},
		error:function(){
			
		}
	});
}

function InitChats(agedata){
	$("#Chart").width(($(window).width()*0.95)/2/3);
	$("#Chart").height(($(window).height()/2-60));
	var myChart = echarts.init(document.getElementById('Chart'));
	option = {
		    title: {
		        text: '年龄',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                    	var agename=item.name;
//	                    	if(Number(item.name)==20){
//	                    		agename='20-25';
//	                    	}
//	                    	else{
//	                    		agename=(Number(item.name)-5)+'-'+item.name;
//	                    	}
	                        result += "  "+item.marker +agename+"岁："+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:40,
                y:25,
                x2:20,
                y2:20,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '30', '35','40','45','50','55','60'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#61a6e7'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#4170a8'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#305d94','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		   /* visualMap: {
		        show: false,
		        dimension: 0,
		        pieces: [{
		            lte: 6,
		            color: '#3986b0'
		        }]
		    },*/
		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#825c8b'  
                             }    
                        }  
                    }, 
		            data: agedata
		        }
		    ]
		};
	 myChart.setOption(option);
}

function InitChatsDy(dydata){
	$("#ChartDy").width(($(window).width()*0.95)/2/3);
	$("#ChartDy").height(($(window).height()/2-60));
	var myChart = echarts.init(document.getElementById('ChartDy'));
	option = {
		    title: {
		        text: '党员',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"岁     "+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:40,
                y:25,
                x2:20,
                y2:20,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '30', '35','40','45','50','55','60'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#61a6e7'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		   /* visualMap: {
		        show: false,
		        dimension: 0,
		        pieces: [{
		            lte: 6,
		            color: '#3986b0'
		        }]
		    },*/
		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#88d7db'  
                             }    
                        }  
                    }, 
		            data: dydata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}


function InitChatsXl(xldata){
	$("#ChartXl").width(($(window).width()*0.95)/2/3);
	$("#ChartXl").height(($(window).height()/2-60));
	var myChart = echarts.init(document.getElementById('ChartXl'));
	option = {
		    title: {
		        text: '学历',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"：     "+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:30,
                y:25,
                x2:20,
                y2:35,
               
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '初中','高中','中专','职高','专科','本科','硕士','博士'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    },
                    interval:0,
                    rotate:270
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        show: true,
		        axisLabel: {
		            formatter: '{value}',
		            color: '#61a6e7'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    

		    series: [
		        {
		            name:'年',
		            type:'bar',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color: new echarts.graphic.LinearGradient(
                                     0, 0, 0, 1,
                                   [
                                       {offset: 0, color: '#3899ff'},   // {offset: 0, color: '#2FDE80'},   
                                       {offset: 1, color: '#71effd'}//  {offset: 1, color: '#2FDECA'}
                                   ])
  
                        }  
                    }, 
                    barWidth : 14,
		            data: xldata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}


function InitChatsYmcqqk(ymdata){
	$("#ChartYmcqqk").height(($(window).height()/2-30));
	var myChart = echarts.init(document.getElementById('ChartYmcqqk'));
	option = {
		    /*title: {
		        text: '党员',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },*/
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"： "+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:35,
                y:25,
                x2:10,
                y2:30,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '年休假', '探亲假','婚假','生育假','丧假','因公致伤','病假','事假','其他'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#2180c5'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#88d7db'  
                             }    
                        }  
                    }, 
		            data: ymdata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}






function GetStatisDataAdmin(){
	$.ajax({
		type:"GET",
		url:"getstatisdata",
		//data:{vtdpid:vtdpid},
		beforeSend:function(XHR){
			
		},
		success:function(data){
			//alert(data);
			data=eval('('+data+')');
			if(data.result>0){
				if(data.items){
					if(data.items.ageMap){
						var ageobject=data.items.ageMap[0];
						var agedata=[];
						agedata.push(ageobject.count30);
						agedata.push(ageobject.count35);
						agedata.push(ageobject.count40);
						agedata.push(ageobject.count45);
						agedata.push(ageobject.count50);
						agedata.push(ageobject.count55);
						agedata.push(ageobject.count60);
						InitChatsAdmin(agedata);
					}
					
					
					if(data.items.dyMap){
						var dyobject=data.items.dyMap[0];
						var dydata=[];
						dydata.push(dyobject.count30);
						dydata.push(dyobject.count35);
						dydata.push(dyobject.count40);
						dydata.push(dyobject.count45);
						dydata.push(dyobject.count50);
						dydata.push(dyobject.count55);
						dydata.push(dyobject.count60);
						InitChatsDyAdmin(dydata);
					}
					
					if(data.items.xlMap){
						var xlobject=data.items.xlMap[0];
						var xldata=[];
						xldata.push(xlobject.czxl);
						xldata.push(xlobject.gzxl);
						xldata.push(xlobject.zzxl);
						xldata.push(xlobject.zgxl);
						xldata.push(xlobject.dzxl);
						xldata.push(xlobject.bkxl);
						xldata.push(xlobject.ssxl);
						xldata.push(xlobject.bsxl);
						InitChatsXlAdmin(xldata);
					}
					
					if(data.items.ymkqjzMap){
						
						var ymobject=data.items.ymkqjzMap[0];
						var ymdata=[];
						if(ymobject==null){
							ymdata=[0,0,0,0,0,0,0,0,0]
						}
						else{
							ymdata.push(ymobject.xjts);
							ymdata.push(ymobject.tqjts);
							ymdata.push(ymobject.hjts);
							ymdata.push(ymobject.syjts);
							ymdata.push(ymobject.sangjts);
							ymdata.push(ymobject.gsts);
							ymdata.push(ymobject.bjts);
							ymdata.push(ymobject.sjts);
							ymdata.push(ymobject.qtts);
						}
						
						
						
						InitChatsYmcqqkAdmin(ymdata);
					}
					
					if(data.items.kqjzqkMap){
						var jzqkobject=data.items.kqjzqkMap[0];
						var jzqkname=[];
						var jzqkdata=[];
						if(jzqkobject==null){
							jzqkdata=[0,0,0,0,0]
						}
						else{
							var fixx=jzqkobject.yue+'月';
							jzqkname=[fixx+'1日',fixx+'2日',fixx+'3日',fixx+'4日',fixx+'5日',]
							jzqkdata.push(jzqkobject.dyt==null?0:jzqkobject.dyt);
							jzqkdata.push(jzqkobject.det==null?0:jzqkobject.det);
							jzqkdata.push(jzqkobject.dst==null?0:jzqkobject.dst);
							jzqkdata.push(jzqkobject.dsit==null?0:jzqkobject.dsit);
							jzqkdata.push(jzqkobject.dwt==null?0:jzqkobject.dwt);
							InitChatsKqjzqkAdmin(jzqkname,jzqkdata);
						}
					}
					
				}
				
			}
			else{
				
			}
		},
		complete:function(XHR){
			
		},
		error:function(){
			
		}
	});
}

function InitChatsAdmin(agedata){
	$("#ChartAdmin").width(($(window).width()*0.95)/2/3);
	$("#ChartAdmin").height(($(window).height()/3-60));
	var myChart = echarts.init(document.getElementById('ChartAdmin'));
	option = {
		    title: {
		        text: '年龄',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                    	var agename=item.name;
//	                    	if(Number(item.name)==20){
//	                    		agename='20-25';
//	                    	}
//	                    	else{
//	                    		agename=(Number(item.name)-5)+'-'+item.name;
//	                    	}
	                        result += "  "+item.marker +agename+"岁："+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:40,
                y:25,
                x2:20,
                y2:20,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '30', '35','40','45','50','55','60'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#61a6e7'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#4170a8'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#305d94','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		   /* visualMap: {
		        show: false,
		        dimension: 0,
		        pieces: [{
		            lte: 6,
		            color: '#3986b0'
		        }]
		    },*/
		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#825c8b'  
                             }    
                        }  
                    }, 
		            data: agedata
		        }
		    ]
		};
	 myChart.setOption(option);
}

function InitChatsDyAdmin(dydata){
	$("#ChartDyAdmin").width(($(window).width()*0.95)/2/3);
	$("#ChartDyAdmin").height(($(window).height()/3-60));
	var myChart = echarts.init(document.getElementById('ChartDyAdmin'));
	option = {
		    title: {
		        text: '党员',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"岁     "+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:40,
                y:25,
                x2:20,
                y2:20,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '30', '35','40','45','50','55','60'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#61a6e7'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		   /* visualMap: {
		        show: false,
		        dimension: 0,
		        pieces: [{
		            lte: 6,
		            color: '#3986b0'
		        }]
		    },*/
		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#88d7db'  
                             }    
                        }  
                    }, 
		            data: dydata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}


function InitChatsXlAdmin(xldata){
	$("#ChartXlAdmin").width(($(window).width()*0.95)/2/3);
	$("#ChartXlAdmin").height(($(window).height()/3-60));
	var myChart = echarts.init(document.getElementById('ChartXlAdmin'));
	option = {
		    title: {
		        text: '学历',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"：     "+ item.value +"人";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:30,
                y:25,
                x2:20,
                y2:35,
               
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '初中','高中','中专','职高','专科','本科','硕士','博士'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    },
                    interval:0,
                    rotate:270
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        show: true,
		        axisLabel: {
		            formatter: '{value}',
		            color: '#61a6e7'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    

		    series: [
		        {
		            name:'年',
		            type:'bar',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color: new echarts.graphic.LinearGradient(
                                     0, 0, 0, 1,
                                   [
                                       {offset: 0, color: '#3899ff'},   // {offset: 0, color: '#2FDE80'},   
                                       {offset: 1, color: '#71effd'}//  {offset: 1, color: '#2FDECA'}
                                   ])
  
                        }  
                    }, 
                    barWidth : 14,
		            data: xldata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}


function InitChatsYmcqqkAdmin(ymdata){
	$("#ChartYmcqqkAdmin").height(($(window).height()/3-40));
	var myChart = echarts.init(document.getElementById('ChartYmcqqkAdmin'));
	option = {
		    /*title: {
		        text: '党员',
		        left:'center',
		        textStyle: {
		              fontWeight: "normal",
		              color: "#aadeff", 
		              fontSize: 14
		        }
		    },*/
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"： "+ item.value +"天";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:35,
                y:25,
                x2:10,
                y2:30,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: [ '年休假', '探亲假','婚假','生育假','丧假','因公致伤','病假','事假','其他'],
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#2180c5'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#88d7db'  
                             }    
                        }  
                    }, 
		            data: ymdata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}



function InitChatsKqjzqkAdmin(jzqkname,jzqkdata){
	
	$("#ChartKqjzqkAdmin").height(($(window).height()/3-30));
	var myChart = echarts.init(document.getElementById('ChartKqjzqkAdmin'));
	option = {
		   
		    tooltip: {
		        trigger: 'axis',
		        axisPointer: {
		           // type: 'shadow'
		        },
		        backgroundColor:'#3187c2'
		        //,formatter:'{b0} {c}人'
		        	,formatter: function(params) {
	                    var result = '';
	                    params.forEach(function (item) {
	                    	//alert(JSON.stringify(item))
	                        result += "   "+item.marker +item.name+"： "+ item.value +"";
	                    });
	                    return result;
	                },
	                textStyle: {
			              fontWeight: "normal",
			              color: "#aadeff", 
			              fontSize: 8
			        }
		    },
		    grid:{
                x:35,
                y:25,
                x2:10,
                y2:30,
                borderWidth:1
            },
		    toolbox: {
		        show: true,
		        feature: {
		            //saveAsImage: {}
		        }
		    },
		    xAxis:  {
		        type: 'category',
		        boundaryGap: true,
		        data: jzqkname,
		        axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#aadeff'
                    }
                },
                axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    yAxis: {
		        type: 'value',
		        axisLabel: {
		            formatter: '{value}',
		            color: '#2180c5'
		        },
		        axisPointer: {
		            snap: true
		        },
		        splitLine: {           // 分隔线
			        show: true,        // 默认显示，属性show控制显示与否
			        lineStyle: {       // 属性lineStyle（详见lineStyle）控制线条样式
			            color: ['#2180c5'],
			            width: 1,
			            type: 'solid'
			        }
			    },
			    splitArea: {           // 分隔区域
			        show: true,       // 默认不显示，属性show控制显示与否
			        areaStyle: {       // 属性areaStyle（详见areaStyle）控制区域样式
			            color: ['#25619f','none']
			        }
			    },
			    axisTick:{
			    	show:false
			    },
			    axisLine:{
			    	show:false
			    }
		    },
		    


		    
		    series: [
		        {
		            name:'年',
		            type:'line',
		            smooth: true,
		            itemStyle : {  
                        normal : {  
                        	 color:'#00FF00',  
                             lineStyle:{  
                                 color:'#88d7db'  
                             }    
                        }  
                    }, 
		            data: jzqkdata
		        }
		    ]
		};
	 myChart.setOption(option);
	
}






function InitTableByBt(){
	var table;
	var _this=this;
	layui.use('table', function() {
	    table = layui.table;
	    table.init('summarylist', {
			height : $(window).height() - 80
			,url : 'getsummarylist' // 数据接口
			,page : false // 开启分页
			,limit : 40
			,limits:[20,40,80,100]
			,id: 'summarylist'
			,method:"post"
				,request:{
					type:'post'
				}
				,where:{
					year: $("#year").val(),
					quarter:$("#quarter").val()
					}
			    ,done: function(res, page, count){
			      var dataarr=res.data;
	              $("[data-field='zhdf']").children().each(function(index){ 
			    		if(index>0){
			    			var text=$(this).text();
			    			if(text=="0"){
			    				$(this).text("");
			    			}
			    			
			    		}
	              })  
			    }
				
				
		  });
	    
	    
	    
	    
	    
	})
	
	return table;
	
	

}


function searchtable(flag){
	
	table.reload('summarylist', { 
		  page: {
	        curr: 1 //重新从第 1 页开始
	      }
	,page:false
	    ,where: {  
	    	year: $("#year").val(),
			quarter:$("#quarter").val()
	    }  
	}); 
	
	if(flag==1){
		switch($("#quarter").val()){
		case "1":
			$(".laytable-cell-group").html("第一季度");
			break;
		case "2":
			
			$(".laytable-cell-group span").html("第二季度");
			break;
		case "3":
			$(".laytable-cell-group").html("第三季度");
			break;
		case "4":
			$(".laytable-cell-group").html("第四季度");
			break;
		}
		
	}
}






